<html>

<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>安装程序 - 织梦内容管理系统 <?=$verMsg;?>
</title>
<link rel="icon" href="../favicon.ico" />
<!-- CSS FILES -->
<link rel="stylesheet" type="text/css" href="../assets/pkg/uikit/css/uikit.min.css" />
<link rel="stylesheet" type="text/css" href="../assets/css/install.dede.css" />
</head>

<body>
<!--HEADER-->
<header id="install-top">
<div class="uk-container uk-container-dede">
<nav class="uk-navbar-transparent uk-light" data-uk-navbar>
<div class="uk-navbar-left">
<span class="uk-navbar-item uk-logo">
<img src="../assets/img/dedecms.png" /> &nbsp; <?=$verMsg;?> &nbsp;安装程序
</span>
</div>
<div class="uk-navbar-right">
<ul class="uk-navbar-nav">
<li><a href="http://www.DedeCMS.com" class="install-link" target="_blank">官方网站</a></li>
<li><a href="http://bbs.DedeCMS.com" target="_blank">技术论坛</a></li>
<li><a href="https://github.com/dedecms" target="_blank">GITHUB</a></li>
<li><a href="http://help.DedeCMS.com" target="_blank">帮助</a></li>
</ul>
</div>
</nav>
</div>
</header>
<!--/HEADER-->

<div class="uk-container uk-container-dede">
<div uk-grid>
<!--安装步骤-->
<div id="install-menu" class="uk-width-1-4@m">
<div class="uk-card uk-card-small uk-card-default">
<div class="uk-card-header">
<div class="uk-grid uk-grid-small uk-text-small" data-uk-grid="">
<div class="uk-width-expand uk-first-column">
<span class="cat-txt">安装步骤</span>
</div>
</div>
</div>
<div class="uk-card-body">
<ul class="uk-tab-left" uk-tab>
<li class="uk-disabled"><a>许可协议</a></li>
<li class="uk-disabled"><a>环境检测</a></li>
<li class="uk-active"><a>参数配置</a></li>
<li class="uk-disabled"><a>正在安装</a></li>
<li class="uk-disabled"><a>安装完成</a></li>
</ul>
</div>
</div>
</div>
<!--/安装步骤-->

<div id="install-container" class="uk-width-3-4@m">
<form action="index.php" method="post" name="form1">
<input type="hidden" name="step" value="4" />
<div class="uk-card uk-card-small uk-card-default card-margin-bottom">
<div class="uk-card-header">
<div class="uk-grid uk-grid-small uk-text-small" data-uk-grid="">
<div class="uk-width-expand uk-first-column">
<span class="cat-txt">数据库设置</span>
</div>
</div>
</div>
<div class="uk-padding-remove uk-card-body">
<table class="uk-table uk-table-small uk-table-striped install-card-margin">
<tr>
<td class="uk-form-small uk-width-small">数据库类型</td>
<td><select name="dbtype" class="uk-select uk-form-width-medium uk-form-small">
<option value="mysql" selected>MySQL</option>
</select>
</td>
</tr>
<tr>
<td class="uk-form-small uk-width-small">数据库主机</td>
<td><input name="dbhost" id="dbhost" type="text" value="127.0.0.1"
class="uk-input uk-form-width-medium uk-form-small" />
<small>一般为localhost</small>
</td>
</tr>
<tr>
<td class="uk-form-small uk-width-small">数据库用户</td>
<td><input name="dbuser" id="dbuser" type="text" value="root"
class="uk-input uk-form-width-medium uk-form-small" />
</td>
</tr>
<tr>
<td class="uk-form-small uk-width-small">数据库密码</td>
<td>
<div style='float:left;margin-right:3px;'><input name="dbpwd" id="dbpwd"
type="text" class="uk-input uk-form-width-medium uk-form-small"
onChange="TestDb()" /></div>
<div style='float:left' id='dbpwdsta'></div>
</td>
</tr>
<tr>
<td class="uk-form-small uk-width-small">数据表前缀</td>
<td><input name="dbprefix" id="dbprefix" type="text" value="dede_"
class="uk-input uk-form-width-medium uk-form-small" />
<small>如无特殊需要,请不要修改</small>
</td>
</tr>
<tr>
<td class="uk-form-small uk-width-small">数据库名称</td>
<td>
<div style='float:left;margin-right:3px;'><input name="dbname" id="dbname"
type="text" value="<?php echo $dfDbname; ?>"
class="uk-input uk-form-width-medium uk-form-small"
onChange="HaveDB()" /></div>
<div style='float:left' id='havedbsta'></div>
</td>
</tr>
<tr>
<td class="uk-form-small uk-width-small">数据库编码</td>
<td class="uk-form-small uk-width-small">
<input type="radio" name="dblang" id="dblang_utf8" value="utf8"
checked="checked" class="uk-radio" />
<label for="dblang_utf8"> UTF8</label>
</td>
</tr>
</table>
</div>
</div>

<div class="uk-card uk-card-small uk-card-default card-margin-bottom">
<div class="uk-card-header">
<div class="uk-grid uk-grid-small uk-text-small" data-uk-grid="">
<div class="uk-width-expand uk-first-column">
<span class="cat-txt">管理员初始密码</span>
</div>
</div>
</div>
<div class="uk-padding-remove"uk-card-body>
<table class="uk-table uk-table-small uk-table-striped install-card-margin">
<tr>
<td class="uk-form-small uk-width-small">用户名</td>
<td>
<input name="adminuser" type="text" value="admin"
class="uk-input uk-form-width-medium uk-form-small" />
<small>只能用0-9、a-z、A-Z、.、@、_、-、!</small>
</td>
</tr>
<tr>
<td class="uk-form-small uk-width-small">密　码</td>
<td><input name="adminpwd" type="text" value="admin"
class="uk-input uk-form-width-medium uk-form-small" />
<small>默认密码：admin，建议
<a href="javascript:randpwd();">手动生成</a></small>
</td>
</tr>
<tr>
<td class="uk-form-small uk-width-small">Cookie加密码</td>
<td><input name="cookieencode" type="text" value="<?php echo $rnd_cookieEncode; ?>" class="uk-input uk-form-width-large uk-form-small" /></td>
</tr>
</table>
</div>
</div>

<div class="uk-card uk-card-small uk-card-default card-margin-bottom ">
<div class="uk-card-header">
<div class="uk-grid uk-grid-small uk-text-small" data-uk-grid="">
<div class="uk-width-expand uk-first-column">
<span class="cat-txt">网站设置</span>
</div>
</div>
</div>
<div class="uk-padding-remove uk-card-body">
<table class="uk-table uk-table-small  uk-table-justify uk-table-striped install-card-margin">
<tbody>
<tr>
<td class="uk-form-small uk-width-small">网站名称</td>
<td>
<input name="webname" type="text" value="我的网站" class="uk-input uk-form-width-medium uk-form-small" />
</td>
</tr>
<tr>
<td class="uk-form-small uk-width-small">管理员邮箱</td>
<td><input name="adminmail" type="text" value="" class="uk-input uk-form-width-medium uk-form-small" /></td>
</tr>
<tr>
<td class="uk-form-small uk-width-small"> 网站网址</td>
<td><input name="baseurl" type="text" value="<?php echo $baseurl; ?>" class="uk-input uk-form-width-medium uk-form-small" /></td>
</tr>
<tr>
<td class="uk-form-small uk-width-small">CMS安装目录</td>
<td><input name="cmspath" type="text" class="uk-input uk-form-width-medium uk-form-small" value="<?php echo $basepath; ?>" /> <small> 在根目录安装时不必理会</small></td>
</tr>
</tbody>
</table>
</div>
</div>

<!--模块选择-->
<div class="uk-card uk-card-small uk-card-default ">
<div class="uk-card-header">
<div class="uk-grid uk-grid-small uk-text-small" data-uk-grid="">
<div class="uk-width-expand uk-first-column">
<span class="cat-txt">模块选择</span>
</div>
</div>
</div>
<div class="uk-card-body">
<b>默认已安装模块(不需要可在后台卸载)：</b>
<div class="uk-margin uk-grid-small uk-child-width-auto uk-grid">
<label>百度新闻</label> <label>文件管理器</label> <label>挑错管理</label> <label>投票模块</label>
<label>友情链接</label>
</div>
<b>已下载并可选安装的：（不能选中的为未下载）</b>
<div class="uk-margin uk-grid-small uk-child-width-auto uk-grid">
<label><input type='checkbox' name='modules[]' class="uk-checkbox" <?php if(!IsDownLoad($module_local.'59155be87ea60c5c65ec1f7a46a0fc9d')){?>disabled<?php }?> value='59155be87ea60c5c65ec1f7a46a0fc9d' /> 手机WAP浏览</label>
<label><input type='checkbox' name='modules[]' class="uk-checkbox" <?php if(!IsDownLoad($module_local.'7badb72a3ff79af2a7112beee60cb970')){?>disabled<?php }?> value='7badb72a3ff79af2a7112beee60cb970' /> 小说模块</label>
<label><input type='checkbox' name='modules[]' class="uk-checkbox" <?php if(!IsDownLoad($module_local.'867af26e9c1ccf22a1cf67e756cf5acc')){?>disabled<?php }?> value='867af26e9c1ccf22a1cf67e756cf5acc' /> 黄页模块</label>
<label><input type='checkbox' name='modules[]' class="uk-checkbox" <?php if(!IsDownLoad($module_local.'8964eda9013d1df0afea08ed63243436')){?>disabled<?php }?> value='8964eda9013d1df0afea08ed63243436' /> 站内新闻</label>
<label><input type='checkbox' name='modules[]' class="uk-checkbox" <?php if(!IsDownLoad($module_local.'be722dbfa3cb3cb5628aab2d767ff62e')){?>disabled<?php }?> value='be722dbfa3cb3cb5628aab2d767ff62e' /> 问答模块</label>
<label><input type='checkbox' name='modules[]' class="uk-checkbox" <?php if(!IsDownLoad($module_local.'dfcb5cd4d7bc0e3f7eb655e62dd6bc64')){?>disabled<?php }?> value='dfcb5cd4d7bc0e3f7eb655e62dd6bc64' /> 圈子模块</label>
<label><input type='checkbox' name='modules[]' class="uk-checkbox" <?php if(!IsDownLoad($module_local.'c10bb6ac52082ab3e669b4814b44a6f1')){?>disabled<?php }?> value='c10bb6ac52082ab3e669b4814b44a6f1' /> 邮件订阅</label>
<label><input type='checkbox' name='modules[]' class="uk-checkbox" <?php if(!IsDownLoad($module_local.'0a7bea5dbe571d35def883cbec796437')){?>disabled<?php }?> value='0a7bea5dbe571d35def883cbec796437' /> 留言簿模块</label>
</div>
<b>初始化数据体验包</b>
<div class="uk-margin uk-grid-small uk-child-width-auto uk-grid">

<label for="installdemo">
<input name="installdemo" type="checkbox" id="installdemo" class="uk-checkbox" value="1" /> 安装初始化数据进行体验(体验数据将含带DedeCMS大部分功能的应用操作示例)</label>
<?php if($isdemosign == 0){ ?>
<div class="olink" id="_remotesta">
<font color="red">[×]</font> 不存在<a href="javascript:GetRemoteDemo()">远程获取</a>
</div>
<?php } else { ?>
<font color="green">[√]</font> 存在(您可以选择安装进行体验)
<?php } ?>
</div>
</div>
</div>
<!--/模块选择-->

<div class="uk-card-footer">
<div class="uk-grid uk-flex uk-flex-middle">
<div class="uk-width-expand uk-text-small uk-first-column">
<input type="button" class="uk-button" value="后退" onclick="window.location.href='index.php?step=2';" />
</div>
<div class="uk-width-auto uk-text-right">
<button type="submit" class="uk-button  uk-button-primary">开始安装</button>
</div>

</div>
</div>
</form>
<footer class="uk-section ">
<div class="uk-container uk-text-small uk-text-center">
Powered by <a href="http://www.dedecms.com"
title="织梦内容管理系统(DedeCMS)--国内专业的PHP网站管理系统，轻松建站的利器。" target="_blank">DedeCMS
</a> &copy; 2007-2021 <a href="http://www.desdev.cn/" target="_blank">上海卓卓网络科技有限公司</a>
(DesDev Inc.)
</div>
</footer>

</div>

</div>

<!--/安装步骤-->

<!-- JS FILES -->
<script src="../assets/pkg/uikit/js/uikit.min.js"></script>
<script src="../assets/pkg/uikit/js/uikit-icons.min.js"></script>
<script src="../assets/pkg/dede/dedeajax2.js" language="javascript" type="text/javascript"></script>
<script language="javascript" type="text/javascript">

function $o(tid) {
return document.getElementById(tid);
}
function TestDb() {
var dbhost = $o('dbhost').value;
var dbuser = $o('dbuser').value;
var dbpwd = $o('dbpwd').value;
$o('havedbsta').innerHTML = '<img src=\'images/ajax-loader.gif\'>';
var myajax = new DedeAjax($o('dbpwdsta'), false, true, '-', '-', '...');
myajax.SendGet2('index.php?step=10&dbhost=' + dbhost + '&dbuser=' + dbuser + '&dbpwd=' + dbpwd);
DedeXHTTP = null;
HaveDB();
}

function HaveDB() {
var dbhost = $o('dbhost').value;
var dbname = $o('dbname').value;
var dbuser = $o('dbuser').value;
var dbpwd = $o('dbpwd').value;
var myajax = new DedeAjax($o('havedbsta'), false, true, '-', '-', '...');
myajax.SendGet2('index.php?step=10&dbhost=' + dbhost + '&dbuser=' + dbuser + '&dbpwd=' + dbpwd + '&dbname=' + dbname);
DedeXHTTP = null;
}

function GetRemoteDemo() {

$o('_remotesta').innerHTML = '<img src=\'images/ajax-loader.gif\'>';
var myajax = new DedeAjax($o('_remotesta'), false, true, '-', '-', '...');
myajax.SendGet2('index.php?step=11');
DedeXHTTP = null;
}

function DoInstall() {
//$o('postloader').style.display = 'block';
document.form1.submit();
}

function randpwd() {
// >= IE8
document.querySelector("input[name='adminpwd']").value = Math.random().toString(36).slice(-8) + Math.random().toString(36).slice(-8);
}

</script>
</body>

</html>